<template>
  <div>
    {{time}}
  </div>
</template>

<script>
  export default {
    name: "dsq",
    data() {  // data   date
      return {
        time: '',  // 只要这个数据一改变, 页面就会重新渲染
      }
    },
    created() {
      // this.time = new Date()
      // 定时器,  定时执行...
      // var jsq = setInterval(()=>{this.time = new Date()},1000);
      // clearInterval(jsq)

      // setInterval(this.get_time,1000)
    },
    methods: {
      get_time() {
        this.axios.get('time/').then(res => {
          this.time = res.data.time
        })
      }
    }
  }
</script>

<style scoped>

</style>
